Submit Button Element

The Submit Button Element provides a pre-configured button which the user can click or tap when they have finished filling in your form.

Clicking or tapping the Submit Button will output the current values in all Elements which have an output data mapping configured to the Datasources specified in those output mapping. You will need to make sure that all Elements whose contents you want to save have been output mapped to a Datasource, e.g. by using the New Datasource from Form option.

If the user has created multiple records whilst using the form, submitting the form will save all records to the relevant databases.

In addition, if you have used the File Upload Element, any specified files will be uploaded when the form is submitted.

When you publish a form, as part of the publishing settings, you can specify that a PDF copy of the form should be automatically created when a user submits the form.

  • If an Imported or Digitise Forms Dataset has a Primary Key with a data type of int and its Identity property set to True or a data type of uniqueidentifier (GUID), Form Studio will automatically assign a value to the Primary Key field. For Primary Key(s) which have other data types, you will need to manually enter a suitable value into the Primary Key field(s), either within your custom JavaScript or via an output mapping from a suitable Element on the form, before you submit the form. When you publish your form, Digitise Forms will warn you if there are any Datasets which won't automatically have their Primary Keys generated.

    Digitise Forms Datasources automatically have their Primary Key set to be a GUID, so this is generally only a potential issue with Imported Datasources. You can check a Primary Key's data type by opening the appropriate Dataset from the Datasources tab in the Project Explorer.

    For Imported Stored Procedures which only include inserts or updates, and don't return a Result Set, you will need to provide the Primary Key value(s) if these are not accounted for in the Stored Procedure, Digitise Forms will not supply these as it does for Imported and Digitise Forms Datasources.

    Imported Stored Procedures which return a Result Set do not use the Submit button to upload data and so this is not relevant in this situation.

 

  • Imported Stored Procedures which return a result set are not affected by this button - in order to execute them you need to use the LoadDatasource action in an Event (see Events tab under Properties below) or call loadDatasource within custom JavaScript. Imported Stored Procedures which only perform inserts and updates and those used with Digitise Forms Datasources will be executed by a call to submitForm providing you have output mapped Elements to them.

 

  • If you are upgrading from Digitise Forms v1.4 or earlier, changes to the Submit Button error handling introduced in v1.4 could potentially result in error messages being displayed when a form is submitted which previously would have been handled silently.  This only refers to error messages which were present before but were simply not displayed in earlier versions. As with any upgrade, we recommend you thoroughly test your forms after upgrading and republishing in the latest Form Studio before updating your live systems.

 

 


See also:

Sanitize Data